// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity.p_a;

import android.content.Context;
import android.view.*;
import android.widget.*;
import com.nnee.p_fk.cls_k;
import com.nnee.p_img.cls_d;
import com.nnee.p_pr.p_activity.p_view.cls_c;
import com.nnee.p_pr.p_atom.*;
import java.util.HashMap;

// Referenced classes of package com.nnee.p_pr.p_activity.a:
//            i, ag, aa

public class cls_ad extends cls_i
{

    public cls_ad(Context context, int i1, int j1, String as[], int ai[])
    {
        f = 0;
        g = 0;
        h = 0;
        i = 0;
        j = 0;
        l = null;
        m = null;
        n = null;
        o = null;
        p = null;
        q = null;
        if(context != null)
        {
            h = i1;
            j = j1;
            l = as;
            m = ai;
            n = context;
            o = LayoutInflater.from(n);
            q = new HashMap();
        }
    }

    private void a(cls_ag ag1, View view)
    {
_L2:
        return;
        if(ag1 == null || view == null || m == null || l == null) goto _L2; else goto _L1
_L1:
        int i1 = m.length;
        int j1 = 0;
        while(j1 < i1) 
        {
            View view1 = view.findViewById(m[j1]);
            if(l[j1].equals("icon"))
                ag1.a = (ImageView)view1;
            else
            if(l[j1].equals("mark"))
                ag1.b = (ImageView)view1;
            else
            if(l[j1].equals("title"))
                ag1.c = (TextView)view1;
            else
            if(l[j1].equals("content"))
                ag1.e = (TextView)view1;
            else
            if(l[j1].equals("ratingbar"))
                ag1.d = (RatingBar)view1;
            else
            if(l[j1].equals("button"))
            {
                ag1.h = (Button)view1;
                ag1.h.setOnClickListener(p);
            } else
            if(l[j1].equals("subs"))
                ag1.g = (TextView)view1;
            j1++;
        }
        ag1.f = (TextView)view.findViewById(0x7f0d0098);
        if(true) goto _L2; else goto _L3
_L3:
    }

    private void a(cls_ag ag1, cls_u u1, int i1)
    {
        if(ag1 != null && u1 != null) goto _L2; else goto _L1
_L1:
        return;
_L2:
        ag1.h.setFocusable(false);
        ag1.h.setClickable(true);
        String s;
        String s1;
        cls_c c1;
        c c2;
        if(u1.al())
        {
            if(u1.S())
                i = 2;
            else
                i = 0;
        } else
        {
            i = 1;
        }
        i;
        JVM INSTR tableswitch 0 2: default 76
    //                   0 415
    //                   1 369
    //                   2 461;
           goto _L3 _L4 _L5 _L6
_L3:
        s = u1.U();
        ag1.c.setText(s);
        s1 = u1.X();
        ag1.e.setText(s1);
        String s2;
        if(u1.aS() >= 0)
            ag1.f.setText((new StringBuilder()).append("").append(u1.aS()).toString());
        else
            ag1.f.setVisibility(8);
        ag1.d.setNumStars(u1.ae());
        ag1.d.setRating((float)u1.ah());
        if(q != null && q.containsKey(u1.V()))
        {
            if(((aa)q.get(u1.V())).equals(aa.a))
            {
                ag1.b.setVisibility(0);
                ag1.h.setText(0x7f0a0057);
                ag1.h.setCompoundDrawablesWithIntrinsicBounds(0x7f02002c, 0, 0, 0);
            } else
            if(((aa)q.get(u1.V())).equals(aa.b))
            {
                ag1.b.setVisibility(8);
                ag1.h.setText(0x7f0a0075);
                ag1.h.setCompoundDrawablesWithIntrinsicBounds(0x7f02002b, 0, 0, 0);
            }
        } else
        if(u1.aj().equals(aa.a))
        {
            ag1.b.setVisibility(0);
            ag1.h.setText(0x7f0a0057);
            ag1.h.setCompoundDrawablesWithIntrinsicBounds(0x7f02002c, 0, 0, 0);
        } else
        {
            ag1.b.setVisibility(8);
            ag1.h.setText(0x7f0a0075);
            ag1.h.setCompoundDrawablesWithIntrinsicBounds(0x7f02002b, 0, 0, 0);
        }
        c1 = new cls_c();
        c1.a = u1.V();
        c1.b = i1;
        ag1.h.setTag(c1);
        c2 = new cls_c();
        c2.a = (new StringBuilder()).append(c1.a).append("mark").toString();
        ag1.b.setTag(c2);
        s2 = u1.b(g.g);
        if(s2 == null)
        {
            ag1.a.setImageResource(com.nnee.p_fk.cls_k.a(n).a(0x7f02012c));
        } else
        {
            ag1.a.setImageResource(com.nnee.p_fk.cls_k.a(n).a(0x7f02012c));
            StringBuilder stringbuilder = new StringBuilder();
            ag1.a.setTag(stringbuilder);
            com.nnee.p_img.cls_d.a().a(stringbuilder, 1, s2, new com.nnee.p_pr.p_activity.a.aa(this, ag1), -1, -1, 2, k);
        }
        if(true) goto _L1; else goto _L5
_L5:
        ag1.h.setVisibility(8);
        ag1.d.setVisibility(8);
        ag1.b.setVisibility(8);
        ag1.e.setVisibility(0);
        ag1.g.setVisibility(0);
          goto _L3
_L4:
        ag1.h.setVisibility(0);
        ag1.d.setVisibility(0);
        ag1.e.setVisibility(8);
        ag1.g.setVisibility(8);
        ag1.f.setVisibility(8);
          goto _L3
_L6:
        ag1.h.setVisibility(0);
        ag1.e.setVisibility(0);
        ag1.d.setVisibility(8);
        ag1.g.setVisibility(8);
        ag1.f.setVisibility(8);
          goto _L3
    }

    public aa a(String s)
    {
        aa aa1;
        if(q != null)
            aa1 = (aa)q.get(s);
        else
            aa1 = aa.c;
        return aa1;
    }

    public void a(android.view.View.OnClickListener onclicklistener)
    {
        p = onclicklistener;
    }

    public void a(cls_aa aa1, String s)
    {
        if(q != null)
            q.put(s, aa1);
    }

    public void b()
    {
        super.a();
        c();
        p = null;
        l = null;
        m = null;
        o = null;
        n = null;
    }

    public void b(int i1)
    {
        h = i1;
    }

    public void c()
    {
        if(q != null)
            q.clear();
    }

    public void c(int i1)
    {
        f = i1;
    }

    public void d(int i1)
    {
        g = i1;
    }

    public void e(int i1)
    {
        k = i1;
    }

    public com.nnee.p_pr.p_atom.cls_u f(int i1)
    {
        if(1 == h)
            i1 += f;
        return (com.nnee.p_pr.p_atom.cls_u)super.getItem(i1);
    }

    public int getCount()
    {
        int i1;
        if(1 == h)
            i1 = g;
        else
            i1 = super.getCount();
        return i1;
    }

    public Object getItem(int i1)
    {
        return f(i1);
    }

    public View getView(int i1, View view, ViewGroup viewgroup)
    {
        cls_ag ag1;
        com.nnee.p_pr.p_atom.cls_u u1;
        if(view != null && (view.getTag() instanceof cls_ag))
        {
            ag1 = (ag)view.getTag();
        } else
        {
            view = o.inflate(j, null);
            ag1 = new cls_ag(this);
            a(ag1, view);
            view.setTag(ag1);
        }
        u1 = f(i1);
        if(u1 != null)
            a(ag1, u1, i1);
        return view;
    }

    public static final int a = 1;
    public static final int b = 2;
    public static final int c = 0;
    public static final int d = 1;
    public static final int e = 2;
    private int f;
    private int g;
    private int h;
    private int i;
    private int j;
    private int k;
    private String l[];
    private int m[];
    private Context n;
    private LayoutInflater o;
    private android.view.View.OnClickListener p;
    private HashMap q;
}
